﻿var hh5= "#fEffect/ItemEff/3012023/1/9#";//拟人化星星
var hh7= "#fEffect/ItemEff/3994441/8#";//小精灵
var status = -1;

function action(mode, type, selection) {
    if (mode == 1) {
        status++;
    } else {
        if (status == 0) {
            cm.sendOk("#e真的要放弃这次获取以下物品的机会了么?"+hh7+"\r\n#v2430210#* 8#v2049376#*3#v2614002#*20#v5062024#*100#v2435153#*3#v2616051#*10#v2430453#*10\r\n#v4021016#*6000#v1143023##v5062402##v2435482##v2436384##g战力礼包#rV#k#bI#k\r\n");
            cm.dispose();
        }
        status--;
    }
    if (status == 0) {
        cm.sendYesNo("#e#g#v2436383#战力礼包V#k (价值约5060余额)\r\n"+"打开该礼包,将获取#v2430209#* 8个,以及各类强大的道具祝您起飞!\r\n#v2049376#*3#v2614002#*20#v5062024#*100#v2435153#*3#v2616051#*10#v2430453#*10\r\n#v4021016#*6000#v1143023##v5062402##v2435482##v2436384##g战力礼包#rV#k#bI#k\r\n#r警告#k:一定要保持背包每栏至少留有#g15#k个空位哟,否则东西少了我是不负责的哟~\r\n\r\n是否花费#r2666#k余额打开该礼包？#k");
    } else if (status == 1) {
        if(cm.getHyPay(1)> 2666){
 	cm.sendOk("恭喜你成功打开了战力礼包I,快去背包里查看把!");
        cm.addHyPay(2666);
        cm.gainItem(2436383, -1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2430209, 1);
        cm.gainItem(2049376, 3);
        cm.gainItem(2435482, 1);
        cm.gainItem(2614002, 20);
        cm.gainItem(5062024, 100);
        cm.gainItem(2435153, 3);
        cm.gainItem(2616051, 10);
        cm.gainItem(2430453, 10);
        cm.gainItem(4021016, 6000);
        cm.gainItem(1143023, 1);
        cm.gainItem(5062402, 1);
        cm.gainItem(2436384, 1);
        cm.dispose();
}
      else if (cm.getHyPay(1)<= 2666){             
       cm.sendOk(hh5+"\r\n#e您的#r余额#k不足哟~~是否考虑消费一下下来起飞呢?");
       cm.dispose();
}
    }
}